package application.controller;

import application.ATMFrame;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;

import java.io.IOException;

public class MainController {
    Parent tp;
    public void Exit() {
        try {
            tp = FXMLLoader.load(getClass()
                    .getResource("../fxml/Login.fxml"));
            Scene tpScene = new Scene(tp);
            ATMFrame.stage.setScene(tpScene);

        } catch (IOException e1) {
            System.out.println("执行出错");
            e1.printStackTrace();
        }
    }
    public void Deposit() {
        try {
            tp = FXMLLoader.load(getClass()
                    .getResource("../fxml/Deposit.fxml"));
            Scene tpScene = new Scene(tp);
            ATMFrame.stage.setScene(tpScene);

        } catch (IOException e1) {
            System.out.println("执行出错");
            e1.printStackTrace();
        }
    }
}
